package com.tk.exam.vo.paper;

import com.tk.exam.domain.TkQuestions;
import com.tk.exam.domain.TkRPaperQuestion;
import com.tk.exam.domain.TkStudentAnswer;
import com.tk.exam.utils.JsonUtils;
import com.tk.exam.vo.question.Option;
import com.tk.exam.vo.question.resp.TkQuestionDXRespVo;
import lombok.Data;

import java.util.List;
import java.util.Objects;

@Data
public class GetStuDXResp {
    private List<Option> options;
    private String quesTitle;
    private int sortIndex;
    public GetStuDXResp(TkRPaperQuestion tkRPaperQuestion, TkQuestionDXRespVo question,TkQuestionDXRespVo respVo){
        setOptions(Objects.nonNull(respVo)?respVo.getOptions():question.getOptions());
        setQuesTitle(question.getQuesTitle());
        setSortIndex(tkRPaperQuestion.getSortIndex());
    }
}
